<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta charset="utf-8"/>
    <title>    TFC-Trotri Foundation Classes &raquo; \tfc\util\Smtp
</title>
    <meta name="author" content=""/>
    <meta name="description" content=""/>

            <link href="../css/template.css" rel="stylesheet" media="all"/>
    
            <!--[if lt IE 9]>
        
        <![endif]-->
        <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
        <script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script src="../js/bootstrap.js" type="text/javascript"></script>
        <script src="../js/template.js" type="text/javascript"></script>
        <script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
    
            <link rel="shortcut icon" href="../img/favicon.ico"/>
        <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
        <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
        <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
    </head>
<body>

        <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span> <span class="icon-bar"></span>
                    <span class="icon-bar"></span> </a>
                <a class="brand" href="http://www.trotri.com/">Trotri官网</a><a class="brand" href="../index.html">TFC-Trotri Foundation Classes</a>

                <div class="nav-collapse">
                    <ul class="nav">
                        <li class="dropdown">
                            <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                API Documentation <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                                                    <li><a>Namespaces</a></li>
                                                                        <li><a href="../namespaces/tfc.html">tfc</a></li>
                                                                                                                                </ul>
                        </li>
                        <li class="dropdown" id="charts-menu">
                            <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                Charts <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../graph_class.html">
                                        <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown" id="reports-menu">
                            <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                Reports <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../errors.html">
                                         
                                    </a>
                                </li>
                                <li>
                                    <a href="../markers.html">
                                        <i class="icon-list-alt"></i>&#160;Markers
                                    </a>
                                </li>
                                <li>
                                    <a href="../deprecated.html">
                                        <i class="icon-list-alt"></i>&#160;Deprecated
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="go_to_top">
            <a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>
        </div>
    </div>
    
    <div id="___" class="container">
        <noscript>
            <div class="alert alert-warning">
                Javascript is disabled; several features are only available if Javascript is enabled.
            </div>
        </noscript>

        
            <style>
        .deprecated h2 {
            text-decoration: line-through;
        }
    </style>
    <div class="row">
        <div class="span4">
                    <div class="btn-group view pull-right" data-toggle="buttons-radio">
        <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
        <button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
    </div>
    <div class="btn-group visibility" data-toggle="buttons-checkbox">
        <button class="btn public active" title="Show public elements">Public</button>
        <button class="btn protected" title="Show protected elements">Protected</button>
        <button class="btn private" title="Show private elements">Private</button>
        <button class="btn inherited active" title="Show inherited elements">Inherited</button>
    </div>

        <ul class="side-nav nav nav-list">
        <li class="nav-header">
            <i class="icon-custom icon-method"></i> Methods
            <ul>
                                                                                                    <li class="method public">
        <a href="#method___construct" title="__construct :: 构造方法：初始化SMTP主机地址、SMTP用户名、SMTP密码、是否显示发件人地址、是否显示收件人地址、发件人地址
&lt;ul&gt;
&lt;li&gt;{@link $host = &#039;smtp.qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $username = &#039;******@qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $password = &#039;******&#039;}&lt;/li&gt;
&lt;/ul&gt;">
            <span class="description">构造方法：初始化SMTP主机地址、SMTP用户名、SMTP密码、是否显示发件人地址、是否显示收件人地址、发件人地址
&lt;ul&gt;
&lt;li&gt;{@link $host = &#039;smtp.qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $username = &#039;******@qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $password = &#039;******&#039;}&lt;/li&gt;
&lt;/ul&gt;</span><pre>__construct</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_sendMail" title="sendMail :: 发送邮件">
            <span class="description">发送邮件</span><pre>sendMail</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_sendData" title="sendData :: 发送邮件正文数据">
            <span class="description">发送邮件正文数据</span><pre>sendData</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setToMail" title="setToMail :: 设置收件人地址">
            <span class="description">设置收件人地址</span><pre>setToMail</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_setFromMail" title="setFromMail :: 设置发件人地址">
            <span class="description">设置发件人地址</span><pre>setFromMail</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_authLogin" title="authLogin :: 验证SMTP用户名和SMTP密码">
            <span class="description">验证SMTP用户名和SMTP密码</span><pre>authLogin</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_open" title="open :: 连接SMTP服务器">
            <span class="description">连接SMTP服务器</span><pre>open</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_close" title="close :: 关闭SMTP服务器">
            <span class="description">关闭SMTP服务器</span><pre>close</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getHost" title="getHost :: 获取SMTP主机地址">
            <span class="description">获取SMTP主机地址</span><pre>getHost</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getPort" title="getPort :: 获取SMTP端口号，默认是 25">
            <span class="description">获取SMTP端口号，默认是 25</span><pre>getPort</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getUsername" title="getUsername :: 获取SMTP用户名">
            <span class="description">获取SMTP用户名</span><pre>getUsername</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getPassword" title="getPassword :: 获取SMTP密码">
            <span class="description">获取SMTP密码</span><pre>getPassword</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getFromMail" title="getFromMail :: 获取发件人地址，应该和用户名相同，如果不相同，有可能出错">
            <span class="description">获取发件人地址，应该和用户名相同，如果不相同，有可能出错</span><pre>getFromMail</pre>
        </a>
    </li>

                                                </ul>
        </li>
        <li class="nav-header protected">» Protected
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </ul>
        </li>
        <li class="nav-header private">» Private
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                </ul>
        </li>
        <li class="nav-header">
            <i class="icon-custom icon-constant"></i> Constants
            <ul>
                            </ul>
        </li>
    </ul>


        </div>

        <div class="span8">
            <div class="element class">
                <h1>Smtp</h1>
                <small style="display: block; text-align: right">
                                                        </small>
                <p class="short_description">Smtp class file
简单邮件传输协议发送到邮件服务器（邮件传输代理MTA）</p>
                <div class="details">
                    <div class="long_description">
                        
                    </div>
                    <table class="table table-bordered">
                                                                                    <tr>
                                    <th>
                                        author
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>宋欢 <a href="mailto:trotri@yeah.net">trotri@yeah.net</a></p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        version
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>$Id: Smtp.php 1 2013-03-29 16:48:06Z huan.song $</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        package
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>tfc.util</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        since
                                                                            </th>
                                    <td>
                                                                                    1.0
                                                                                
                                    </td>
                                </tr>
                                                                                                                                                                                                                                    </table>

                    <h3><i class="icon-custom icon-method"></i> Methods</h3>
                                                                <a id="method___construct"></a>
                        <div class="element clickable method public  method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
                            <h2>构造方法：初始化SMTP主机地址、SMTP用户名、SMTP密码、是否显示发件人地址、是否显示收件人地址、发件人地址
&lt;ul&gt;
&lt;li&gt;{@link $host = &#039;smtp.qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $username = &#039;******@qq.com&#039;}&lt;/li&gt;
&lt;li&gt;{@link $password = &#039;******&#039;}&lt;/li&gt;
&lt;/ul&gt;</h2>
                            <pre>__construct(string $host, string $username, string $password, boolean $showFromMail = true, boolean $showToMail = true, string $fromMail = &#039;&#039;) </pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$host</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$username</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$password</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$showFromMail</h4>
                                                <code>boolean</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$showToMail</h4>
                                                <code>boolean</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$fromMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_sendMail"></a>
                        <div class="element clickable method public  method_sendMail" data-toggle="collapse" data-target=".method_sendMail .collapse">
                            <h2>发送邮件</h2>
                            <pre>sendMail(string $toMail, string $subject, string $body) : boolean</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$toMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$subject</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$body</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>boolean</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_sendData"></a>
                        <div class="element clickable method public  method_sendData" data-toggle="collapse" data-target=".method_sendData .collapse">
                            <h2>发送邮件正文数据</h2>
                            <pre>sendData(string $subject, string $body, string $toMail = &#039;&#039;, string $fromMail = &#039;&#039;) : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果反馈消息不是以354开头，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$subject</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$body</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$toMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$fromMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setToMail"></a>
                        <div class="element clickable method public  method_setToMail" data-toggle="collapse" data-target=".method_setToMail .collapse">
                            <h2>设置收件人地址</h2>
                            <pre>setToMail(string $toMail) : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果反馈消息不是以250开头，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$toMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_setFromMail"></a>
                        <div class="element clickable method public  method_setFromMail" data-toggle="collapse" data-target=".method_setFromMail .collapse">
                            <h2>设置发件人地址</h2>
                            <pre>setFromMail(string $fromMail) : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果反馈消息不是以250开头，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$fromMail</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_authLogin"></a>
                        <div class="element clickable method public  method_authLogin" data-toggle="collapse" data-target=".method_authLogin .collapse">
                            <h2>验证SMTP用户名和SMTP密码</h2>
                            <pre>authLogin(string $username, string $password, boolean $auth = true) : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果发送用户名后反馈消息不是以220或250开头，抛出异常</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果发送登录命令后反馈消息不是以334开头，抛出异常</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果发送加密登录命令后反馈消息不是以334开头，抛出异常</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果发送加密密码命令后反馈消息不是以235开头，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$username</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$password</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$auth</h4>
                                                <code>boolean</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_open"></a>
                        <div class="element clickable method public  method_open" data-toggle="collapse" data-target=".method_open .collapse">
                            <h2>连接SMTP服务器</h2>
                            <pre>open(string $host, integer $port = 25) : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果连接SMTP服务器失败，抛出异常</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果连接服务后反馈消息不是以220开头，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$host</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                                    <div class="subelement argument">
                                                <h4>$port</h4>
                                                <code>integer</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_close"></a>
                        <div class="element clickable method public  method_close" data-toggle="collapse" data-target=".method_close .collapse">
                            <h2>关闭SMTP服务器</h2>
                            <pre>close() : \tfc\util\Smtp</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Smtp.html">\tfc\util\Smtp</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getHost"></a>
                        <div class="element clickable method public  method_getHost" data-toggle="collapse" data-target=".method_getHost .collapse">
                            <h2>获取SMTP主机地址</h2>
                            <pre>getHost() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getPort"></a>
                        <div class="element clickable method public  method_getPort" data-toggle="collapse" data-target=".method_getPort .collapse">
                            <h2>获取SMTP端口号，默认是 25</h2>
                            <pre>getPort() : integer</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>integer</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getUsername"></a>
                        <div class="element clickable method public  method_getUsername" data-toggle="collapse" data-target=".method_getUsername .collapse">
                            <h2>获取SMTP用户名</h2>
                            <pre>getUsername() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getPassword"></a>
                        <div class="element clickable method public  method_getPassword" data-toggle="collapse" data-target=".method_getPassword .collapse">
                            <h2>获取SMTP密码</h2>
                            <pre>getPassword() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getFromMail"></a>
                        <div class="element clickable method public  method_getFromMail" data-toggle="collapse" data-target=".method_getFromMail .collapse">
                            <h2>获取发件人地址，应该和用户名相同，如果不相同，有可能出错</h2>
                            <pre>getFromMail() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                    
                    
                                                                <h3><i class="icon-custom icon-property"></i> Properties</h3>
                                                    <a id="property__host"> </a>
                            <div class="element clickable property  protected property__host" data-toggle="collapse" data-target=".property__host .collapse">
                                <h2>SMTP主机地址</h2>
                                <pre>_host : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>SMTP主机地址</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__port"> </a>
                            <div class="element clickable property  protected property__port" data-toggle="collapse" data-target=".property__port .collapse">
                                <h2>SMTP端口号，默认是 25</h2>
                                <pre>_port : integer</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>SMTP端口号，默认是 25</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>integer</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__username"> </a>
                            <div class="element clickable property  protected property__username" data-toggle="collapse" data-target=".property__username .collapse">
                                <h2>SMTP用户名</h2>
                                <pre>_username : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>SMTP用户名</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__password"> </a>
                            <div class="element clickable property  protected property__password" data-toggle="collapse" data-target=".property__password .collapse">
                                <h2>SMTP密码</h2>
                                <pre>_password : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>SMTP密码</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__fromMail"> </a>
                            <div class="element clickable property  protected property__fromMail" data-toggle="collapse" data-target=".property__fromMail .collapse">
                                <h2>发件人地址，应该和用户名相同，如果不相同，有可能出错</h2>
                                <pre>_fromMail : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>发件人地址，应该和用户名相同，如果不相同，有可能出错</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__auth"> </a>
                            <div class="element clickable property  protected property__auth" data-toggle="collapse" data-target=".property__auth .collapse">
                                <h2>是否验证SMTP用户名和SMTP密码</h2>
                                <pre>_auth : boolean</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>是否验证SMTP用户名和SMTP密码</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>boolean</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__stream"> </a>
                            <div class="element clickable property  protected property__stream" data-toggle="collapse" data-target=".property__stream .collapse">
                                <h2>fsockopen句柄</h2>
                                <pre>_stream : resource</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>fsockopen句柄</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>resource</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__showFromMail"> </a>
                            <div class="element clickable property  protected property__showFromMail" data-toggle="collapse" data-target=".property__showFromMail .collapse">
                                <h2>是否显示发件人地址</h2>
                                <pre>_showFromMail : boolean</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>是否显示发件人地址</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>boolean</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__showToMail"> </a>
                            <div class="element clickable property  protected property__showToMail" data-toggle="collapse" data-target=".property__showToMail .collapse">
                                <h2>同时向多人发送邮件时，每个邮件中都会显示所有收件人，如果不想显示这些收件人地址，可以设为false</h2>
                                <pre>_showToMail : boolean</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>同时向多人发送邮件时，每个邮件中都会显示所有收件人，如果不想显示这些收件人地址，可以设为false</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>boolean</code>
                                                                            </div>
                                </div>
                            </div>
                                                            </div>
            </div>
            <a id="\tfc\util\Smtp"></a>
            <ul class="breadcrumb">
                <li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
                    
    
    <li><span class="divider">\</span><a href="../namespaces/tfc.util.html">util</a></li>

                <li class="active"><span class="divider">\</span><a href="../classes/tfc.util.Smtp.html">Smtp</a></li>
            </ul>
        </div>
    </div>

    </div>

        <footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
            <a href="http://glyphicons.com/">Glyphicons</a>.<br/>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
            generated on Sat, 27 Dec 2014 06:16:39 +0000.<br/>
    </footer>
    </body>
</html>
